package com.cweb.admin.model.sys.sys_oss_record.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cweb.framework.base.entity.BaseMybatisModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统-oss上传记录
 * </p>
 *
 * @author changfan
 * @since 2020-04-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class SysOssRecord  extends BaseMybatisModel {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 上传类型
     */
    @TableField("`type`")
    private String type;

    /**
     * bucket
     */
    @TableField("`bucket`")
    private String bucket;

    /**
     * key
     */
    @TableField("`key`")
    private String key;

    /**
     * 文件名
     */
    private String fileName;

    /**
     * 显示url
     */
    @TableField("`url`")
    private String url;

    /**
     * 状态 0:正常
     */
    @TableField("`status`")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(exist = false)
    private Date createTime;

    /**
     * 备注
     */
    private String remark;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
